.mod-cluster.cluster-detail
	.mod-option
		a.ui-btn.ui-btn-lg.ui-btn-link.ui-btn-bright(ui-sref="addHost({id:clusterId})")
			i.icon-add-white
			| 添加主机
		a.icon-delete(ng-click="deleteCluster()")
	.cluster-info
		tabset
			tab(heading="主机列表" active="tabActive[0].active" ui-sref="clusterDetail.hostlist")
				loading(ng-if="isWaitingHost")
				.info-options
					input.ui-input-fill.ui-input-white.ui-input-search.pull-right(placeholder="输入主机名查找" ng-model="hostKey")
					span.info-count(ng-cloak) 共{{nodelistFiltered.length}}台主机
				table.ui-table-dome.full
					thead
						tr
							th 主机名称
							th IP
							th CPU总量（个）
							th 内存总量（MB）
							th 运行实例（个）
							th 状态
					tbody
						tr(ng-if="!nodeList||nodelistFiltered.length===0")
							td(colspan="6") 无相关信息
						tr(ng-repeat="node in nodelistFiltered=(nodeList|filter:{'name':hostKey})")
							td
								a(ng-bind="node.name" ui-sref="hostDetail({name:node.name,clusterId:clusterId})")
							td(ng-bind="node.ip")
							td(ng-bind="node.capacity.cpu")
							td(ng-bind="node.capacity.memory")
							td(ng-bind="node.runningPods")
							td(ng-switch="node.status")
								span(ng-switch-when="Ready").txt-safe 在线
								span(ng-switch-default).txt-prompt 离线
			tab(heading="集群设置" active="tabActive[1].active" ui-sref="clusterDetail.info")
				button.ui-btn.ui-btn-sm.ui-btn-white.edit-cluster(ng-click="checkEdit()" ng-if="!isEdit") 编辑
				button.ui-btn.ui-btn-sm.ui-btn-primary.edit-cluster(ng-click="checkEdit()" ng-if="isEdit") 取消编辑
				div(ng-form name="modifyclusterFrom")
					div.tab-cluster(ng-include="'index/tpl/tplClusterInfo/tplClusterInfo.html'" ng-if="!isEdit")
					div.tab-cluster(ng-include="'index/tpl/tplClusterInfo/tplClusterInfoEdit.html'" ng-if="isEdit")
				.com-bottom-option(ng-if="isEdit")
					.com-bottom-option-con
						button.ui-btn.ui-btn-bright.ui-btn-md(ng-disabled="isWaitingModify" ng-click="needValid=true;modifyclusterFrom.$valid&&modifyCluster()") 保存设置
						span.txt-error(ng-if="needValid&&(modifyclusterFrom.$invalid||!clusterIns.etcdValid||!clusterIns.zookeeperValid||!clusterIns.kafkaValid)") 存在不合法数据，请修改后提交。
			tab(heading="namespace" ng-click="getNamespace()" active="tabActive[2].active" ui-sref="clusterDetail.namespace")
				loading(ng-if="isWaitingNamespace")
				.info-options(ng-form role="form" name="namespaceForm" ng-class="{'need-valid':needValidNamespace}")
					span.namespace-title namespace
					.namespace-con
						.new-namespace
							input.ui-input-white.namespace-txt(ng-model="namespaceTxt.namespace" name="namespace" ng-pattern="/^[a-zA-Z][a-zA-Z0-9_-]*$/")
							button.ui-btn.ui-btn-sm.ui-btn-primary(ng-disabled="isLoadingNamespace" ng-click="needValidNamespace=true;namespaceForm.$valid&&addNamespace()") 添加namespace
						span.txt-error(ng-if="(needValid||namespaceForm.namespace.$dirty)&&namespaceForm.namespace.$invalid")
						ul.com-label-list.namespace-list
							li(ng-repeat="namespace in namespaceList")
								span.label-item
									| {{namespace}}
			tab(heading="集群成员" ng-hide="!hasMemberPermisson" active="tabActive[3].active" ui-sref="clusterDetail.users")
				div.tab-member(ng-include="'index/tpl/tplUserList/tplUserList.html'")